{notempty name="$goodsList"}
<div class="memgift-comment-table mt15">
    <div class="memgift-table-wrapper mb15">
        <div class="memgift-table memgift-table-default">
            <div class="memgift-table-header">
                <table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
                    <thead>
                        <tr>
                            <th> 
                                <div class="memgift-table-con">
                                    <span>商品名称</span> 
                                </div> 
                            </th>
                            <th class="w200"> 
                                <div class="memgift-table-con">
                                    <span>商品价格</span>
                                 </div> 
                            </th>
                            <th class="w100">
                                <div class="memgift-table-con">
                                    <span>现库存</span>
                                 </div> 
                            </th>
                            <th class="w500"> 
                                <div class="memgift-table-con">
                                    <div class="memgift-table-con-flex">
                                        <p class="table-title-integral">积分价</p>
                                        <p class="table-title-stock">积分商品库存</p>
                                    </div>
                                </div> 
                            </th>
                            <th class="w100"> <div class="memgift-table-con"><span>操作</span> </div> </th>
                        </tr>
                    </thead>
                </table>
            </div>

            <div class="memgift-table-body">
                <table cellspacing="0" cellpadding="0" border="0">
                    <tbody class="memgift-table-tbody">
                        {volist name="$goodsList" id="vo"}
                        <tr draggable="false" class="memgift-table-row goodsListTr">
                            <input type="hidden" name="goods_id[]" value="{$vo.goods_id|default=''}">
                            <input type="hidden" name="goods_title[{$vo.goods_id}]" value="{$vo.title|default=''}">
                            <input type="hidden" name="goods_spec[{$vo.goods_id}]" value="{$vo.goods_spec|default=''}">
                            {eq name="$Request.param.sa" value="edit"}
                            <input type="hidden" name="goods_spec_set[{$vo.goods_id}]" value="1" id="goodsSpecSet_{$vo.goods_id}">
                            {else/}
                            <input type="hidden" name="goods_spec_set[{$vo.goods_id}]" value="0" id="goodsSpecSet_{$vo.goods_id}">
                            {/eq}
                            <td>
                                <div class="memgift-table-con">
                                    <div class="pro-title">
                                        <div class="pro-img"><img src="{$vo.litpic}" alt="{$vo.title}"></div>
                                        <p class="pro-name" title="{$vo.title}">{$vo.title}</p>
                                    </div>
                                </div>
                            </td>

                            <td class="w200">
                                <div class="memgift-table-con"> {$vo.spec_price} </div>
                            </td>

                            <td class="w100">
                                <div class="memgift-table-con"> <p>{$vo.stock_count}</p> </div>
                            </td>

                            <td class="w500">
                                <div class="memgift-table-con">
                                    {eq name="$vo.goods_spec" value="1"}
                                    <div class="integral-set" id="notSet_{$vo.goods_id}" {neq name="$vo.goods_spec_set" value="0"} style="display: none;" {/neq}>
                                        <a href="javascript:void(0);" onclick="openFullframe(this, '设置积分价格及库存', '1150px', '750px');" data-href="{:weapp_url('PointsShop/PointsShop/setGoodsSpec', ['aid'=>$vo.aid, 'goods_id'=>$vo.goods_id])}">设置积分价格及库存</a>
                                    </div>
                                    <div class="integral-set" id="hasSet_{$vo.goods_id}" {eq name="$vo.goods_spec_set" value="0"} style="display: none;" {/eq}>
                                        <a style="color: green;" href="javascript:void(0);" onclick="openFullframe(this, '编辑积分价格及库存', '1150px', '750px');" data-href="{:weapp_url('PointsShop/PointsShop/setGoodsSpec', ['aid'=>$vo.aid, 'goods_id'=>$vo.goods_id])}">编辑积分价格及库存</a>
                                    </div>
                                    {else/}
                                    <div class="memgift-table-con-flex">
                                        <div class="table-input">
                                            <div class="memgift-form-item memgift-form-item-xin" style="text-align: left;">
                                                <div class="memgift-form-item-content">
                                                    <input type="text" class="text-input" name="goods_points[{$vo.goods_id}]" placeholder="0" value="{$vo.goods_points|default=''}" npaste="this.value=this.value.replace(/[^\d]/g, '')" onkeyup="this.value=this.value.replace(/[^\d]/g, '');"/>
                                                    <div class="zw-cell-unit">积分</div>
                                                </div>
                                                <span style="display: inline-block;width: 10px;line-height: 36px;margin:0 5px;">+</span>
                                                <div class="memgift-form-item-content">
                                                    <input type="text" class="text-input" name="goods_price[{$vo.goods_id}]" placeholder="0" value="{$vo.goods_price|default=''}" onpaste="this.value=this.value.replace(/[^\d.]/g, '')" onkeyup="this.value=this.value.replace(/[^\d.]/g, '');"/>
                                                    <div class="zw-cell-unit">元</div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="table-input">
                                            <div class="memgift-form-item memgift-form-item-xin" style="text-align: right;">
                                                <div class="memgift-form-item-content">
                                                    <input type="text" class="text-input" name="goods_stock[{$vo.goods_id}]" placeholder="0" value="{$vo.goods_stock|default=''}" npaste="this.value=this.value.replace(/[^\d]/g, '')" onkeyup="this.value=this.value.replace(/[^\d]/g, '');"/>
                                                    <div class="zw-cell-unit">件</div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    {/eq}
                                </div>
                            </td>
                            {eq name="$Request.param.sa" value="edit"}
                            <td class="w100"> <div class="memgift-table-con w100"><a class="curpoin grey">删除</a></div> </td>
                            {else/}
                            <td class="w100">
                                <div class="memgift-table-con w100">
                                    <a class="curpoin" data-id="{$vo.goods_id}" data-aid="{$vo.aid}" onclick="deleteSelectGoods(this);">删除</a>
                                </div>
                            </td>
                            {/eq}
                        </tr>
                        {/volist}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
{/notempty}